#ifndef C_COMMANDER_H
#define C_COMMANDER_H


class cBaseCommander
{
public:
    cBaseCommander();
    virtual ~cBaseCommander();

    virtual int Execute(void* handle) = 0;
    const char* GetLastExecReturnString();

protected:
        char* m_szReturnString;
};

class cCaptureCommander :public cBaseCommander
{
public:
    cCaptureCommander();
    virtual ~cCaptureCommander() = default;

    virtual int Execute(void* handle) override;

    void SetCaptureParam(int iLaneID, int iCapID);
private:
    int m_iLaneID;
    int m_iCapID;
};

class cOverlayCommander :public cBaseCommander
{
public:
    cOverlayCommander();
    virtual ~cOverlayCommander();

    virtual int Execute(void* handle) override;

    void SetOverlayParam(int iChannelID, const char* szOverlayText, int iTextLen);
private:
    int m_iChannelID;
    char* m_szOverlayString;
};

class cSetTimeCommander :public cBaseCommander
{
public:
    cSetTimeCommander();
    virtual ~cSetTimeCommander() = default;

    virtual int Execute(void* handle) override;

    void SetTimeParam(int Year, int Month, int Day, int Hour, int Minute, int Second, int MilientSecond);
private:
    int m_iYear;
    int m_iMonth;
    int m_iDay;
    int m_iHour;
    int m_iMinute;
    int m_iSecond;
    int m_iMilientSecond;    
};

#endif
